home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / emacs / emacs1857 / bin_d2.zoo / lisp / files.elc < prev    next >
Text File  |  1991-12-02  |  30KB  |  450 lines

  1.  
  2. (defconst delete-auto-save-files t "\
  3. *Non-nil means delete a buffer's auto-save file
  4. when the buffer is saved for real.")
  5.  
  6. (defconst make-backup-files (not (eq system-type (quote vax-vms))) "\
  7. *Create a backup of each file when it is saved for the first time.
  8. This can be done by renaming the file or by copying.
  9.  
  10. Renaming means that Emacs renames the existing file so that it is a
  11. backup file, then writes the buffer into a new file.  Any other names
  12. that the old file had will now refer to the backup file.
  13. The new file is owned by you and its group is defaulted.
  14.  
  15. Copying means that Emacs copies the existing file into the backup file,
  16. then writes the buffer on top of the existing file.  Any other names
  17. that the old file had will now refer to the new (edited) file.
  18. The file's owner and group are unchanged.
  19.  
  20. The choice of renaming or copying is controlled by the variables
  21. backup-by-copying, backup-by-copying-when-linked and
  22. backup-by-copying-when-mismatch.")
  23.  
  24. (defconst backup-by-copying nil "\
  25. *Non-nil means always use copying to create backup files.
  26. See documentation of variable  make-backup-files.")
  27.  
  28. (defconst backup-by-copying-when-linked nil "\
  29. *Non-nil means use copying to create backups for files with multiple names.
  30. This causes the alternate names to refer to the latest version as edited.
  31. This variable is relevant only if  backup-by-copying  is nil.")
  32.  
  33. (defconst backup-by-copying-when-mismatch nil "\
  34. *Non-nil means create backups by copying if this preserves owner or group.
  35. Renaming may still be used (subject to control of other variables)
  36. when it would not result in changing the owner or group of the file;
  37. that is, for files which are owned by you and whose group matches
  38. the default for a new file created there by you.
  39. This variable is relevant only if  backup-by-copying  is nil.")
  40.  
  41. (defconst buffer-offer-save nil "\
  42. *Non-nil in a buffer means offer to save the buffer on exit
  43. even if the buffer is not visiting a file.  Automatically local in
  44. all buffers.")
  45.  
  46. (make-variable-buffer-local (quote buffer-offer-save))
  47.  
  48. (defconst file-precious-flag nil "\
  49. *Non-nil means protect against I/O errors while saving files.
  50. Some modes set this non-nil in particular buffers.")
  51.  
  52. (defvar version-control nil "\
  53. *Control use of version numbers for backup files.
  54. t means make numeric backup versions unconditionally.
  55. nil means make them for files that have some already.
  56. never means do not make them.")
  57.  
  58. (defvar dired-kept-versions 2 "\
  59. *When cleaning directory, number of versions to keep.")
  60.  
  61. (defvar trim-versions-without-asking nil "\
  62. *If true, deletes excess backup versions silently.
  63. Otherwise asks confirmation.")
  64.  
  65. (defvar kept-old-versions 2 "\
  66. *Number of oldest versions to keep when a new numbered backup is made.")
  67.  
  68. (defvar kept-new-versions 2 "\
  69. *Number of newest versions to keep when a new numbered backup is made.
  70. Includes the new backup.  Must be > 0")
  71.  
  72. (defconst require-final-newline nil "\
  73. *t says silently put a newline at the end whenever a file is saved.
  74. Non-nil but not t says ask user whether to add a newline in each such case.
  75. nil means don't add newlines.")
  76.  
  77. (defconst auto-save-default t "\
  78. *t says by default do auto-saving of every file-visiting buffer.")
  79.  
  80. (defconst auto-save-visited-file-name nil "\
  81. *t says auto-save a buffer in the file it is visiting, when practical.
  82. Normally auto-save files are written under other names.")
  83.  
  84. (defconst save-abbrevs nil "\
  85. *Non-nil means save word abbrevs too when files are saved.
  86. Loading an abbrev file sets this to t.")
  87.  
  88. (defconst find-file-run-dired t "\
  89. *Non-nil says run dired if find-file is given the name of a directory.")
  90.  
  91. (defvar find-file-not-found-hooks nil "\
  92. List of functions to be called for find-file on nonexistent file.
  93. These functions are called as soon as the error is detected.
  94. buffer-file-name is already set up.
  95. The functions are called in the order given,
  96. until one of them returns non-nil.")
  97.  
  98. (defvar find-file-hooks nil "\
  99. List of functions to be called after a buffer is loaded from a file.
  100. The buffer's local variables (if any) will have been processed before the
  101. functions are called.")
  102.  
  103. (defvar write-file-hooks nil "\
  104. List of functions to be called before writing out a buffer to a file.
  105. If one of them returns non-nil, the file is considered already written
  106. and the rest are not called.")
  107.  
  108. (defconst inhibit-local-variables nil "\
  109. *Non-nil means query before obeying a file's local-variables list.
  110. This applies when the local-variables list is scanned automatically
  111. after you find a file.  If you explicitly request such a scan with
  112. \\[normal-mode], there is no query, regardless of this variable.")
  113.  
  114. (or (fboundp (quote lock-buffer)) (fset (quote lock-buffer) (quote ignore)))
  115.  
  116. (or (fboundp (quote unlock-buffer)) (fset (quote unlock-buffer) (quote ignore)))
  117.  
  118. (defun pwd nil "\
  119. Show the current default directory." (interactive nil) (byte-code "ijêאב    \"ç" [nil default-directory message "Directory %s"] 3))
  120.  
  121. (defun cd (dir) "\
  122. Make DIR become the current buffer's default directory." (interactive "DChange default directory: ") (byte-code "בêג✓!ë⓪ê    ד=?à④ה✓!ë⓪êו✓!?â#זח✓\"é&✓ë②êט ç" [dir system-type default-directory nil expand-file-name vax-vms file-name-as-directory file-directory-p error "%s is not a directory" pwd] 6))
  123.  
  124. (defun load-file (file) "\
  125. Load the file FILE of Lisp code." (interactive "fLoad file: ") (byte-code "IJêבג✓!IJIJא$ç" [file nil t load expand-file-name] 6))
  126.  
  127. (defun load-library (library) "\
  128. Load the library named LIBRARY.
  129. This is an interface to the function `load'." (interactive "sLoad library: ") (byte-code "IJêא✓!ç" [library nil load] 2))
  130.  
  131. (defun switch-to-buffer-other-window (buffer) "\
  132. Select buffer BUFFER in another window." (interactive "BSwitch to buffer in other window: ") (byte-code "בêIJ⑧ג
  133. IJ\")ç" [pop-up-windows t buffer nil pop-to-buffer] 3))
  134.  
  135. (defun find-file (filename) "\
  136. Edit file FILENAME.
  137. Switch to a buffer visiting file FILENAME,
  138. creating one if none already exists." (interactive "FFind file: ") (byte-code "IJêאב✓!!ç" [filename nil switch-to-buffer find-file-noselect] 3))
  139.  
  140. (defun find-file-other-window (filename) "\
  141. Edit file FILENAME, in another window.
  142. May create a new window, or reuse an existing one;
  143. see the function display-buffer." (interactive "FFind file in other window: ") (byte-code "IJêאב✓!!ç" [filename nil switch-to-buffer-other-window find-file-noselect] 3))
  144.  
  145. (defun find-file-read-only (filename) "\
  146. Edit file FILENAME but don't save without confirmation.
  147. Like find-file but marks buffer as read-only." (interactive "fFind file read-only: ") (byte-code "בêג✓!êאë①ç" [filename buffer-read-only t nil find-file] 3))
  148.  
  149. (defun find-alternate-file (filename) "\
  150. Find file FILENAME, select its buffer, kill previous buffer.
  151. If the current buffer now contains an empty file that you just visited
  152. (presumably by mistake), use this command to visit the file you really want." (interactive "FFind alternate file: ") (byte-code "גêה à⑤וזחט \"!?à⑤יכ!êp
  153. ט ⑨⑧למ!êגë②êנÄס êע!)êפ✓!+ç" [obuf ofile buffer-file-name oname nil filename buffer-modified-p yes-or-no-p format "Buffer %s is modified; kill anyway? " buffer-name error "Aborted" rename-buffer " **lose**" ((byte-code "✓p=à⓪
  154. ë①êג êד♪!ç" [obuf buffer-file-name ofile oname lock-buffer rename-buffer] 3)) unlock-buffer find-file kill-buffer] 11))
  155.  
  156. (defun create-file-buffer (filename) "\
  157. Create a suitably named buffer for visiting FILENAME, and return it.
  158. FILENAME (sans directory) is used unchanged if that name is free;
  159. otherwise a string <2> or <3> or ... is appended to get an unused name." (byte-code "א    !⑧ב✓ג\"à    ë⓪êד✓!)ç" [lastname filename file-name-nondirectory string= "" generate-new-buffer] 4))
  160.  
  161. (defun find-file-noselect (filename &optional nowarn) "\
  162. Read file FILENAME into a buffer and return the buffer.
  163. If a buffer exists visiting FILENAME, return that one,
  164. but verify that the file has not changed since visited or saved.
  165. The buffer is not selected, just returned to the caller." (byte-code "ו✓!ë⓪êזח✓\"à⑥✓טי!SכOë⓪êל✓!â.    â'מ✓!é+בנ✓\"éÄס✓!כə
  166. âl åiע
  167. !åiפ✓!?âPבצ✓\"éiקר
  168. !â[שé\\ת!àiè
  169. qêןדד\")éïèך✓!ë②ê
  170. qêם êכףץÅê§✓!ë⑥╱ê∧♪ ?\")ê
  171. *ç" [filename find-file-run-dired buf error nowarn t default-directory expand-file-name string